#include <iostream>
using std::cin;
using std::cout;
using std::endl;
void turn(char from,char to){
    cout<<from<<"-->"<<to<<endl;
}
void tran(int n,char from,char to,char depend){
    if(n==1){
        turn(from,to);
    }
    else{
        tran(n-1,from,depend,to);
        turn(from,to);
        tran(n-1,depend,to,from);
    }
}

int main(){
    int n;
    cin>>n;
    char x='A';
    char y='B';
    char z='C';
    tran(n,x,z,y);
    return 0;
}
